<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>

    <div class="box">abc</div>
    <div id="id">def</div>
    <h3><span><input type="text"></span></h3>

    <script>
        var elem1 = document.querySelector('.box');
        console.log(elem1);
        var elem2 = document.querySelector('#id');
        console.log(elem2);
        var elem3 = document.querySelector('h3 span input');
        console.log(elem3);

        var elems = document.querySelectorAll('div');
        console.log(elems);

    </script>

</body>
</html>

var element = document.querySelector(selectors);

var elems = document.querySelectorAll('div');